//
//  ZZLCMoreSettingVC.m
//  ZZLC
//
//  Created by colawh on 2018/1/3.
//  Copyright © 2018年 ZhongZeng. All rights reserved.
//

#import "ZZLCMoreSettingVC.h"
#import "ZZLCMoreSettingTableViewCell.h"
@interface ZZLCMoreSettingVC ()<UITableViewDataSource,UITableViewDelegate>
@property(nonatomic)NSArray *iconDataSource;
@property(nonatomic)NSArray *contentDataSource;
@end

@implementation ZZLCMoreSettingVC

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"设置";
    [self loadData];
    // Do any additional setup after loading the view from its nib.
}
- (void)loadData
{
    
    self.contentDataSource = @[@"联系官网",@"意见反馈",@"版本信息"];
    self.iconDataSource = @[@"me_moreseting_contactUs",@"me_moreseting_agreement",@"me_moreseting_version"];
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 3;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    NSArray *nibs = [[NSBundle mainBundle]loadNibNamed:@"ZZLCMoreSettingTableViewCell" owner:self options:nil];
    ZZLCMoreSettingTableViewCell *cell = [nibs firstObject];
    cell.imageView.image = Image(self.iconDataSource[indexPath.row]);
    cell.contentLabel.text = self.contentDataSource[indexPath.row];
    if (indexPath.row == 2) {
        cell.rightLabel.text = @"v1.0";
        cell.rightLabel.textColor = RGBCOLOR(255, 213, 82);
    }
    return cell;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 56;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    switch (indexPath.row) {
        case 0:
            {
                [self jumpToH5VCByURL:@"http://www.assetzz.com/"];
            }
            break;
        case 1:
        {
            
        }
            break;
        default:
            break;
    }
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
